package com.sheep.springboot.servlet;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 在spring boot中使用Servlet
 * author: sheep.Old
 * qq: 64341393
 * Created 2018/11/2
 */
// @WebServlet(urlPatterns = {"/myServlet"})
public class MyServlet  extends HttpServlet {

    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        // resp.setContentType("text/html;charset=utf-8");
        resp.getWriter().append("<h1>这是MyServlet中的service方法呗调用了!</h1>");

    }
}
